183. 从不订购的客户
为保证权益,题目请参考 183. 从不订购的客户(From LeetCode).
解决方案1
Python
python
import pandas as pd
def find_customers(customers: pd.DataFrame, orders: pd.DataFrame) -> pd.DataFrame:
return customers[(~customers["id"].isin(orders["customerId"]))][["name"]].rename(
columns={"name": "Customers"}
)
1
2
3
4
5
6
7
2
3
4
5
6
7